package com.com.spring.student.register;

import org.springframework.beans.factory.annotation.Value;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

public class Stu {
    @Value("张三")
    private String name;
    @Value("123456")
    private String id;
    @Value("123456")
    private Integer password;
@PostConstruct
public void init(){
    System.out.println("初始化");
}
@PreDestroy
public void destroy(){
    System.out.println("销毁");
}

    public void setName(String name) {
        this.name = name;
    }



    public void setId(String id) {
        this.id = id;
    }



    public void setPassword(Integer password) {
        this.password = password;
    }
    public String toString() {
        return "用户注册成功：" +
                "name='" + name + '\'' +
                ", id='" + id + '\'' +
                ", password=" + password +
                '}';
    }


}
